<%@ page contentType="text/html;charset=UTF-8" %>
<%@page import="com.zh.authority.model.*" %>
<%@include file="/commons/taglibs.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
	<title><%=Role.TABLE_ALIAS%> 列表</title>
	<%@include file="/commons/jqueryeasyui.jsp" %>
  </head>
<body>	
	<script type="text/javascript" src="<c:url value="/admin/pages/Role/list.js"/>"></script>
	<div class="easyui-layout" data-options="fit:true,border:false">
		<!-- 
  		<div data-options="region:'north',title:'查询',split:true,doSize:false" style="height:80px;padding: 10px;">
  			<form id="roleSearchForm" method="post">
						<label><%=Role.ALIAS_ROLE_NAME%>：</label>
			  			<span>			 
			  				<input name="roleName" type="text">
			  			</span>	
			  			
						<label><%=Role.ALIAS_URL%>：</label>
			  			<span>			 
			  				<input name="url" type="text">
			  			</span>	
			  			 
  			<span>
  				<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-search'" onclick="roleSearch();">查询</a>
  			</span>
  			</form>
  		</div>  
  		-->
	    <div data-options="region:'center',title:'列表'" style="">
	    	<table id="roleTable" class="easyui-datagrid" 
	    		data-options="rownumbers:true,
	    			url:'<c:url value="/admin/pages/Role/list.do"/>',
	    			fitColumns:true,singleSelect:false,
	    			pagination:true,fitColumns:true,idField:'id',
	    			fit:true,toolbar:'#roleTableToolBar',
	    			onLoadError:function(){
	    				$.messager.alert('服务器错误。');
	    			}">  
			    <thead>  
			        <tr> 
			        	<th data-options="checkbox:true"></th>
			            <th data-options="field:'roleName',sortable:true,width:150"><%=Role.ALIAS_ROLE_NAME%></th>  
			            <th data-options="field:'url',sortable:true,width:150"><%=Role.ALIAS_URL%></th>  
			        </tr>  
			    </thead>  
			</table>  
	    </div>
    </div>
    <div id="roleTableToolBar">
    	<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="openRoleAddWin();">新增</a>
		<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="openRoleEditWin();">编辑</a>
		<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="roleDel('<c:url value="/admin/pages/Role/delete.do"/>');">删除</a>
    	<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="">菜单分配</a>
    </div>
    <div id="roleEditWin" class="easyui-window" style="overflow: hidden;"  
    	data-options="title:'编辑',closed:true,
	    width:400,   
	    height:240,  
	    modal:true,
	    resizable:false,
	    minimizable:false,
	    maximizable:false,
	    draggable:false,
	    collapsible:false
	    ">
    	 <div class="easyui-layout" data-options="closed:true,fit:true">  
	        <div data-options="region:'center',border:false" align="center">
	        	<form id="roleEditForm" method="post" action="<c:url value="/admin/pages/Role/update.do"/>">
					<input id="id" type="hidden" name="id" />
	        	<table width="80%" border="0" style="font-size: 12px;">
						<tr>
		        			<td width="30%" align="right"><%=Role.ALIAS_ROLE_NAME%>：</td>
		        			<td align="left">
		        				<input name="roleName" type="text" chinese="【<%=Role.ALIAS_ROLE_NAME%>】" nullable="no">
		        			</td>
		        		</tr>
						<tr>
		        			<td width="30%" align="right"><%=Role.ALIAS_URL%>：</td>
		        			<td align="left">
		        				<input name="url" type="text" chinese="【<%=Role.ALIAS_URL%>】" nullable="no">
		        			</td>
		        		</tr>
	        	</table>
	        	</form>
	        </div>  
	        <div data-options="region:'south',split:true,border:false" style="height:45px;padding-top: 5px;" align="right">  
	            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add'" onclick="roleEditSubmit();">保存</a>
				<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove'" onclick="$('#roleEditWin').window('close');">取消</a>
	        </div>  
    	</div>  
    </div>
    <div id="roleAddWin" class="easyui-window" style="overflow: hidden;" 
    	data-options="title:'新增',closed:true,
	    width:400,   
	    height:240,   
	    modal:true,
	    resizable:false,
	    minimizable:false,
	    maximizable:false,
	    draggable:false,
	    collapsible:false
    	">
    	 <div class="easyui-layout" data-options="closed:true,fit:true">  
	        <div data-options="region:'center',border:false" align="center" style="">
	        	<form id="roleAddForm" method="post" action="<c:url value="/admin/pages/Role/save.do"/>">
	        	<table width="80%" border="0" style="font-size: 12px;">
						<tr>
		        			<td width="30%" align="right"><%=Role.ALIAS_ROLE_NAME%>：</td>
		        			<td align="left">
		        				<input name="roleName" type="text" chinese="【<%=Role.ALIAS_ROLE_NAME%>】" nullable="no">
		        			</td>
		        		</tr>
						<tr>
		        			<td width="30%" align="right"><%=Role.ALIAS_URL%>：</td>
		        			<td align="left">
		        				<input name="url" type="text" chinese="【<%=Role.ALIAS_URL%>】" nullable="no">
		        			</td>
		        		</tr>
	        	</table>
	        	</form>
	        </div>  
	        <div data-options="region:'south',split:true,border:false" style="height:45px;padding-top: 5px;" align="right">  
	            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add'" onclick="roleAddSubmit();">保存</a>
				<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove'" onclick="$('#roleAddWin').window('close');">取消</a>
	        </div>  
    	</div>  
    </div>
  </body>
</html>
